﻿@model IEnumerable<orienta.Helper.DependenciaInfo>
@{
    Layout = "~/Views/Shared/_LayoutPopUpTree.cshtml";
    ViewBag.Title = "Index";
    var id = 0;
}
<form id="form_lupita">
<script language="javascript" type="text/javascript">
    d = new dTree('d');
    d.add(0, -1, 'Dependencias', '', 'Dependencias', '', '..images/trees/base.gif', '../images/trees/base.gif'); 
@foreach (var item in Model)
{
    id = id + 1;
   
    @:d.add(@item.IdDep,@(item.IdDepPadre == null ? 0: item.IdDepPadre), '@item.DescDep <@String.Format("{0:0000}", item.IdDep)-A>', 'javascript:selectAreaUnica(\'@item.IdDep-A\',\'@item.DescDep\')', '@item.DescDep', '', '../images/trees/folder.gif', '../images/trees/folderopen.gif');
}
   
    document.write(d); d.openTo(1, true); d.s(0); 
</script>
</form>